-- GENERATED SPELL FOR [Keeper of the Cistern] --


function spell0_20795(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_20795', 8341, 1)
end

function spell1_20795(pUnit, Event) --@Water Bolt,n/a--
pUnit:FullCastSpellOnTarget(32011,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20795', 2500, 1)
end

function Sorts_20795(pUnit, Event)
local choix_sorts_20795 = math.random(0, 1)
if choix_sorts_20795 == 0 then
pUnit:RegisterEvent('spell0_20795', 1, 1)
end
if choix_sorts_20795 == 1 then
pUnit:RegisterEvent('spell1_20795', 1, 1)
end
end

function mob20795_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20795', math.random(1500, 3000), 1)
end

function mob20795_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20795_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20795_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20795, 1, 'mob20795_Action')
RegisterUnitEvent(20795, 2, 'mob20795_Leave')
RegisterUnitEvent(20795, 3, 'mob20795_Kill')
RegisterUnitEvent(20795, 4, 'mob20795_Die')
